home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7749 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: fire.wildfire.com!newsadm
  2. From: Stonewall Ballard <stoney@wildfire.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Is there a standard for * and & placement style?
  5. Date: Mon, 19 Feb 1996 13:10:57 -0500
  6. Organization: Wildfire Communications, Inc.
  7. Message-ID: <3128BD31.4AF8@wildfire.com>
  8. NNTP-Posting-Host: zaphod.wildfire.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (WinNT; I)
  13. CC: dev@wildfire.com
  14.  
  15. I'm trying to find out whether there is a "standard" for the 
  16. placement of * and &. A survey of C++ texts shows that most use
  17.  
  18. Form 1
  19.   int&  foo;
  20.   int*  foo;
  21.  
  22. while some use
  23.  
  24. Form 2
  25.   int&  foo;
  26.   int  *foo;
  27.  
  28. and nobody uses (although I've seen this a lot in code)
  29.  
  30. Form 3
  31.   int  &foo;
  32.   int  *foo;
  33.  
  34. The ARM and the latest C++ working paper both use form 1. The 
  35. most well-known user of form 2 is Scott Meyers in his Effective 
  36. C++ books. People I work with use form 3.
  37.  
  38. Imagine that you were given a class framework to use and extend. 
  39. Would you expect that the placement of & and * follow one of the 
  40. above schemes? Do you perceive that there is a standard for the 
  41. placement of * and &? If so, what is it?
  42.  
  43. Please reply by email to stoney@wildfire.com
  44.  
  45. I will summarize the results to the group.
  46.  
  47. Thanks very much!
  48.  
  49.   - Stoney
  50.  
  51.  
  52. ----------------------------------------------------------------
  53. -------
  54. Stonewall Ballard       "I have one grunch but the eggplant over 
  55. there"
  56. stoney@wildfire.com (work)                Wildfire 
  57. Communications, Inc.
  58. stoney@beeblebrox.com (home)          
  59. http://www.tiac.net/users/stoney/
  60.